<template>
  <fieldset>
    <legend>F展示模态框组件</legend>
    <modal :visible="flag" @confirm="handleConfirm" @del="handleDel">
      <template v-slot:title>
        <h3>充值提示</h3>
      </template>

      <template v-slot:body>
        <h3>少年充648?</h3>
      </template>
    </modal>
    <button @click="showModal">点击显示</button>
  </fieldset>
</template>

<script>
import modal from "../modal";
export default {
  data() {
    return {
      flag: false,
    };
  },
  components: {
    modal,
  },
  methods: {
    showModal() {
      this.flag = true;
    },
    handleDel() {
      this.flag = false;
    },
    handleConfirm() {
      this.flag = false;
    },
  },
};
</script>
